#ifndef __VSDL_GAMESTATE_H__
#define __VSDL_GAMESTATE_H__

#include "VSDL_gamengine.h"

class VSDL_GameState{
protected:
	VSDL_EventHandler *eventHandler;
public:
	VSDL_GameState():eventHandler(NULL)
	{
	}

	void AttachEventHandler(VSDL_EventHandler *eventHandler){
		this->eventHandler = eventHandler;
	}

	virtual void Init() = 0;
	virtual void CleanUp() = 0;

	virtual void Pause() = 0;
	virtual void Resume() = 0;

	void HandleEvents(SDL_Event &event, VSDL_GameEngine *game)
	{
		if (eventHandler != NULL){
			VSDL_EventSystem::ProcessEvent(event, *eventHandler, game);
		}
	}
	virtual void Update(VSDL_GameEngine *game) = 0;
	virtual void Draw(VSDL_GameEngine *game) = 0;
};

#endif /*__VSDL_GAMESTATE_H__*/
